package edu.washington.ling.syntric.struct.error;

import java.util.ArrayList;

public class CollectingExceptionHandler {
	
	private ArrayList<String> messages;
	
	public CollectingExceptionHandler() {
		messages = new ArrayList<String>();
	}
	
	public void handle(Exception e) {
		messages.add(e.getMessage());
	}
	
	public boolean hasMessages() {
		return (messages.size() > 0);
	}

	public ArrayList<String> getMessages() {
		return messages;
	}
}
